<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@page pageEncoding="UTF-8" %>
<!doctype html>
<html lang="zh-cmn">
<head>
    <%@include file="/WEB-INF/jsp/comm/head.jsp"%>
</head>
<body>
<div class="container">
    <form class="form-inline">
        <div class="form-group">
            <h3 id="tit">用户管理</h3>
        </div>
        <div class="form-group pull-right">
            <button class="btn btn-primary" type="button" onclick="add()">添加用户</button>
        </div>
    </form>
    <div class="panel panel-default">
        <div class="panel-heading">
            条件查询
        </div>
        <div class="panel-body">
            <form class="form-inline" action="/user/list" method="get">
                <div class="form-group">
                    <label>用户编号:</label>
                    <input type="text" name="userCode"class="form-control">
                </div>&nbsp;&nbsp;&nbsp;
                <div class="form-group">
                    <label>用户名称:</label>
                    <input type="text" name="userName"class="form-control">
                </div>
                <div class="form-group">
                    <button type="submit" class="btn btn-danger"><i class="glyphicon glyphicon-search"></i> 查询</button>
                </div>
            </form>
        </div>
    </div>
    <table class="table table-bordered table-striped">
        <tr>
            <th>编号</th>
            <th>名称</th>
            <th>生日</th>
            <th>电话</th>
            <th>地址</th>
            <th>操作</th>
        </tr>
        <c:forEach items="${list}" var="l">
            <tr>
                <th>${l.userCode}</th>
                <th>${l.userName}</th>
                <fmt:formatDate value="${l.birthday}" pattern="yyyy-MM-dd" var="fd"/>
                <th>${fd}</th>
                <th>${l.phone}</th>
                <th>${l.address}</th>
                <th><a href="/user/del?id=${l.id}">删除</a> <a href="/user/update?id=${l.id}">修改</a></th>
            </tr>
        </c:forEach>
    </table>
</div>
<%@include file="/WEB-INF/jsp/comm/foot.jsp"%>
</body>
</html>